#ifndef QREALTIMEPLOT_H
#define QREALTIMEPLOT_H

#include <QWidget>
#include <qwt_plot.h>
#include "ui_qrealtimeplot.h"
#include "Siim_Define.h"

class QString;
class QColor;

class QwtPlotCurve;
class CSiimData;
#define HISTORY 3600


class QRealTimePlot : public QwtPlot
{
	Q_OBJECT

public:
	QRealTimePlot(int nIndex,SiimDataType dataType,PlotType nType,CSiimData *pData,QWidget *parent = 0);
	~QRealTimePlot();

protected:
	void timerEvent( QTimerEvent *e );

	private Q_SLOTS:


private:
	void showCurve( QwtPlotItem *, bool on );

	struct
	{
		QwtPlotCurve *curve;
		double data[HISTORY];
	} data;

	double timeData[HISTORY];
	int dataCount;
	int m_index;
	SiimDataType dataType;
	CSiimData *m_pData;
public:
	void SetRTData(double *pdata);
};

#endif // QREALTIMEPLOT_H
